﻿/*
 *********************************************************************
 *    Management Extensions for Windows Windows Server AppFabric     *
 *********************************************************************
 *    Author    : Fatih Boy [fatih@enterprisecoding.com]             *
 *    Web site  : http://www.enterprisecoding.com                    *
 *********************************************************************
 *    License   : GNU Library General Public License (LGPL)          * 
 *********************************************************************
 */

using System.Runtime.InteropServices;

namespace Com.Enterprisecoding.AppFabric.Extensions.Client.ObjectPicker {
    [ComImport]
    [Guid("D592AED4-F420-11D0-A36E-00C04FB950DC")]
    [InterfaceType(ComInterfaceType.InterfaceIsDual)]
    public interface IAdsPathname {
        int Set([In, MarshalAs(UnmanagedType.BStr)] string bstrADsPath, [In, MarshalAs(UnmanagedType.U4)] int lnSetType);

        int SetDisplayType([In, MarshalAs(UnmanagedType.U4)] int lnDisplayType);

        [return: MarshalAs(UnmanagedType.BStr)]
        string Retrieve([In, MarshalAs(UnmanagedType.U4)] int lnFormatType);
        
        [return: MarshalAs(UnmanagedType.U4)]
        int GetNumElements();

        [return: MarshalAs(UnmanagedType.BStr)]
        string GetElement([In, MarshalAs(UnmanagedType.U4)] int lnElementIndex);
        
        void AddLeafElement([In, MarshalAs(UnmanagedType.BStr)] string bstrLeafElement);
        
        void RemoveLeafElement();
        
        [return: MarshalAs(UnmanagedType.Interface)]
        object CopyPath();
        
        [return: MarshalAs(UnmanagedType.BStr)]
        string GetEscapedElement([In, MarshalAs(UnmanagedType.U4)] int lnReserved, [In, MarshalAs(UnmanagedType.BStr)] string bstrInStr);
        
        int EscapedMode { get; set; }
    }
}
